package com.jtny.nytb.equipment.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;

/**
 * 规则管理配置DAO接口
 *
 * @author 智慧能源中心 - 刘琦
 * @package com.jtny.nytb.config
 * @fileName RestTemplateConfig .java
 * @createTime 2023/9/22 11:19
 * @Copyright© 2023 jtny
 * 江投能源技术研究院 版权所有
 */
@Configuration
public class RestTemplateConfig {

    @Bean
    public RestTemplate getRestTemplate() {
        SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
        requestFactory.setOutputStreaming(false);
        RestTemplate restTemplate = new RestTemplate(requestFactory);
        return restTemplate;
    }
}